package com.ms.common.util;

public class StringKit {
	public static boolean isBlank(String str)
    {
        int strLen;
        if(str == null || (strLen = str.length()) == 0)
            return true;
        for(int i = 0; i < strLen; i++)
            if(!Character.isWhitespace(str.charAt(i)))
                return false;
 
        return true;
    }
 
    public static boolean notBlank(String str)
    {
        return !isBlank(str);
    }
    
    
    public static boolean notNull(String[] filedName)
    {
        return !isNull(filedName);
    }
    
    
    public static boolean isNull(String[] filedName)
    {
    	if(filedName==null||filedName.length==0){
    		return true;
    	}else{
    		return false;
    	}
 
    }

	public static boolean notBlank(StringBuffer instr) {
		// TODO Auto-generated method stub
		if("".equals(new String (instr))||  new String (instr)==null){
			return false;
		}else{
			return true;
		}
	}

	public static boolean notNull(Object fieldValue) {
		// TODO Auto-generated method stub
		if(fieldValue==null){
			return false;
		}else{
			return true;
		}
	}
}
